package com.ss.demo.springbootdemo.reflect;

import com.ss.demo.springbootdemo.entity.Person;

import java.lang.reflect.Field;

/**
 * 作者: MrZhangJR
 * 时间: 2021/11/8 13:48
 * 描述:
 */
public class ReflectField {
    public static void main(String[] args) {
        Class<Person> personClass = Person.class;
        Field[] fields = personClass.getDeclaredFields();
        for (Field field : fields) {
            System.out.println("field = " + field.getName());
        }
    }
}
